package com.example.spidertp.core.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.spidertp.common.ResponseEntity;
import com.example.spidertp.core.model.entity.OperationRecord;
import com.example.spidertp.core.model.param.OperationRecordQueryParam;
import com.example.spidertp.core.service.TpOperationRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiong.bo
 * @version 1.0
 * @date 2022/9/23 9:41 下午
 */

@Api(tags = "操作日志管理控制器")
@RequestMapping("/api/operations")
@RestController
public class OperationRecordController {

    @Autowired
    private TpOperationRecordService operationRecordService;

    @ApiOperation("获取操作记录列表页")
    @GetMapping
    public ResponseEntity<IPage<OperationRecord>> selectByPage(OperationRecordQueryParam param){
        return ResponseEntity.ok(operationRecordService.selectByPage(param));
    }

}
